package com.superatom.designpattern.proxy;

/**
 * 静态代理Star
 */
public class StaticProxyStar implements Star {
    private Star star;

    public StaticProxyStar(Star star) {
        this.star = star;
    }


    @Override
    public void sign() {
        System.out.println("sign");
    }

    @Override
    public void payMoney() {
        System.out.println("payMoney");
    }

    @Override
    public void sing() {
        star.sing();
    }

    public static void main(String[] args) {
        // 增强RealStar功能
        StaticProxyStar proxyStar = new StaticProxyStar(new RealStar());
        proxyStar.sign();
        proxyStar.sing();
        proxyStar.payMoney();
    }
}
